//
//  MYGProtocolController.swift
//  MYGrow
//
//  Created by 小火科技 on 2024/4/15.
//  协议

import UIKit
import WebKit

class MYGProtocolController: MYGBaseController {

    private var titeleName: String = ""
    var urlString: String = ""
    // MARK: - init
    init(titeleName: String) {
        self.titeleName = titeleName
        super.init(nibName: nil, bundle: nil)
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    // MARK: - life cycle
    override func viewDidLoad() {
        super.viewDidLoad()
        
        title = titeleName
        view.backgroundColor = .white
        
        view.addSubview(webView)
        webView.snp.makeConstraints { make in
            make.edges.equalToSuperview()
        }
        
        webView.loadURL(URL(string: urlString)!)
    }
    
    private lazy var webView:WKWebView = {
        
        let web = WKWebView()
        return web
    }()
  

}
